<include file="Public/head"/>
<body class="no-skin">
<include file="Public/header"/>
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>

    <include file="Public/sidebar"/>
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <include file="Public/breadcrumbs"/>

            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">
                <include file="Public/set"/>

                <!-- /section:settings.box -->
                <div class="row">
                    <div class="col-xs-12">
                        <form class="form-horizontal" id="form" method="post" action="{:U('shareupdate')}">
                            <input type="hidden" name="id" id="id"  value="{$activity['id']}">
                            <!-- PAGE CONTENT BEGINS -->


                            
                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-0">活动状态</label>
                                <div class="col-sm-9">
                                    <select id="status" name="status" class="col-xs-10 col-sm-5">
                                        <option value="1" <if condition="$activity['status'] eq 1">selected</if>>--开启--</option>
                                        <option value="0" <if condition="$activity['status'] eq 0">selected</if>>--关闭--</option>
                                        </foreach>
                                    </select>

                                    <span class="help-inline col-xs-12 col-sm-7">
                                                <span class="middle">选择所属分类。</span>
                                            </span>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-0">活动类型</label>
                                <div class="col-sm-9">
                                    <select id="type" name="type" class="col-xs-10 col-sm-5">
                                        <option value="3" <if condition="$activity['status'] eq 3">selected</if>>分享领书币</option>
                                        <!--<option value="0" <if condition="$activity['status'] eq 2">selected</if>>&#45;&#45;关闭&#45;&#45;</option>-->
                                        </foreach>
                                    </select>

                                    <span class="help-inline col-xs-12 col-sm-7">
                                                <span class="middle">选择所属分类。</span>
                                            </span>
                                </div>
                            </div>



                            
                          

                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-0">活动描述</label>
                                <div class="col-sm-9">
                                    <input type="text" name="description" id="description" placeholder="活动描述"
                                           class="col-xs-10 col-sm-5" value="{$activity['description']}">


                                </div>
                            </div>



                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-0">活动时间</label>
                                <div class="col-sm-9">
                                    <font color="green">开始时间:</font><input name="start_time" type="text"  onClick="WdatePicker()" readonly="readonly"
                                                                           value="{$activity['start_time']}">
                                    <font color="green">结束时间:</font><input name="end_time" type="text"  onClick="WdatePicker()" readonly="readonly"
                                                                            value="{$activity['end_time']}">

                                </div>
                            </div>

                            <div class="form-group" >
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-0">分享返书币</label>
                                <div class="col-sm-9" >
                                    <input type="text" name="subscribe" placeholder="分享返书币额度"
                                           class="col-xs-10 col-sm-5 textbox" value="{$activity['subscribe_money']}">
                                </div>
                            </div>

                            <!--王溪加的-->


                                <!--结束-->






                            <!--<div class="space-4"></div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-4">
                                    活动海报 </label>
                                <div class="col-sm-9">
                                    <div class="col-xs-10 col-sm-5">
                                        {:UpImage("img",100,100,$novel['img'])}
                                    </div>
                                    <span class="help-inline col-xs-12 col-sm-7">
                                                <span class="middle">仅支持jpg、gif、png、bmp、jpeg，且小于1MB。</span>
                                            </span>
                                </div>

                            </div>-->
                            <div class="space-4"></div>

                            <div class="col-md-offset-2 col-md-9">
                                <button class="btn btn-info submit" type="button">
                                    <i class="icon-ok bigger-110"></i>
                                    提交
                                </button>

                                &nbsp; &nbsp; &nbsp;
                                <button class="btn" type="reset">
                                    <i class="icon-undo bigger-110"></i>
                                    重置
                                </button>
                            </div>

                            <!-- PAGE CONTENT ENDS -->


                        </form>
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <include file="Public/footer"/>

</div><!-- /.main-container -->

<include file="Public/footerjs"/>
<!-- inline scripts related to this page -->
<script type="text/javascript">
    $(function () {
       


        $("#tabs").tabs();
        var editor = KindEditor.create('textarea[name="content"]', {
            uploadJson: '__PUBLIC__/kindeditor/php/upload_json.php',
            fileManagerJson: '__PUBLIC__/kindeditor/php/file_manager_json.php',
            allowFileManager: true,
            afterBlur: function () {
                this.sync();
            }
        });
        $(".submit").click(function () {
           
            $("#form").submit();
        });
        
        $("#class_id").change(function(){
            var class_name = $("#class_id").find("option:selected").text();
            class_name = class_name.replace(/-/g,"");
            $("#class_name").val(class_name);
        });
        
        $("#other_class_id").change(function(){
            var class_name = $("#other_class_id").find("option:selected").text();
            class_name = class_name.replace(/-/g,"");
            $("#other_class_name").val(class_name);
        });        
    });
</script>
</body>
</html>
